import request from '@/utils/request'

export function uploadAdvise(data) {
	return request({
		'url': '/advise/uploadAdvise',
		'method': 'post',
		'data': data
	})
}
// 上传分配
export function sentAddress(id, firstAddress, secondAddress) {
	const data = {
		id,
		firstAddress,
		secondAddress
	}
	return request({
		'url': '/advise/sentAddress',
		'method': 'post',
		'data': data
	})
}
// 驳回投诉意见
export function rejectedAdvise(id) {
	const data = {
		id
	}
	return request({
		'url': '/advise/rejectedAdvise',
		'method': 'post',
		'data': data
	})
}
// 上传处理结果
export function uploadResults(aid, content, phone, name, imgList) {
	const data = {
		aid,
		content,
		phone,
		name,
		imgList
	}
	return request({
		'url': '/results/uploadResults',
		'method': 'post',
		'data': data
	})
}

// 驳回处理结果
export function rejectedResults(id, aid, reason) {
	const data = {
		id,
		aid,
		reason
	}
	return request({
		'url': '/results/rejectedResults',
		'method': 'post',
		'data': data
	})
}

// 通过处理结果
export function passResults(aid) {
	return request({
		'url': '/results/passResults',
		'method': 'post',
		'data': {
			aid
		}
	})
}